package com.gc.server.vo.up;


import com.gc.server.entity.SchoolEntity;
import com.gc.server.entity.ShopEntity;
import com.gc.server.entity.UserEntity;
import lombok.Data;

import java.util.Date;

import com.alibaba.excel.annotation.*;

import java.io.Serializable;


import com.gc.server.entity.UserSchoolEntity;
import com.gc.server.vo.UserSchoolVo;


/**
 * 用户学校关系实体
 * 表名 user_school
 *
 * @author hxf
 * @email 505860922@qq.com
 * @date ${datetime}
 */
@Data
public class UserSchoolUp implements Serializable {
    @ExcelIgnore
    private static final long serialVersionUID = 1L;
    //
    @ExcelProperty("")
    private Long id;

    //学校ID
    @ExcelProperty("学校ID")
    private Long schoolId;

    @ExcelProperty("学校名")
    private Long schoolName;


    @ExcelProperty("学校编号")
    private String schoolCode;

    //用户ID
    @ExcelProperty("用户ID")
    private Long userId;

    //用户ID
    @ExcelProperty("用户名")
    private String name;

    //用户ID
    @ExcelProperty("用户编号")
    private String code;

    //备注
    @ExcelProperty("备注")
    private String remark;


    public UserSchoolUp() {

    }

    public UserSchoolVo toVo() {

        UserSchoolEntity entity = new UserSchoolEntity();
        UserSchoolVo vo = new UserSchoolVo(entity);
        entity.setId(id);
        entity.setSchoolId(schoolId);
        entity.setUserId(userId);
        entity.setRemark(remark);
        UserEntity userEntity = new UserEntity();
        userEntity.setCode(code);
        SchoolEntity schoolEntity = new SchoolEntity();
        schoolEntity.setCode(schoolCode);
        vo.setSchool(schoolEntity);
        vo.setUser(userEntity);
        return vo;
    }


}
